<template>
	<view class="NoticeList plr-16">
		<view v-for="(item, idx) in list" :key="item.id" class="noticeItem flex-center-sb" v-if="idx <= 2" @click="$u.route('/pages/notice/noticeDetails', { id: item.id })">
		    <view>
				<view class="font-size-16 font-w-500">{{ item.title }}</view>
				<view class="time">{{ $u.timeFormat(item.createtime, "yyyy/mm/dd hh:MM") }}</view>
			</view>
			<w-icon name="arrow-right-mini" size="12"></w-icon>
		</view>
		<w-loading style="padding: 32rpx 0" :type="loadingType" emptyType="search" emptyTop="60"></w-loading>
	</view>
</template>

<script>
	export default {
		name:'NoticeList',
		props: {
			list: {
				type: Array,
				default: () => []
			},
			loadingType: {
				type: String,
				default: 'more'
			}
		}
	}
</script>

<style lang="scss" scoped>
.NoticeList {
	.noticeItem {
	    width: 100%;
	    padding: 26rpx 0;
	    border-bottom: 2rpx solid #eee;
		&:nth-last-child(2) {
			border-bottom: none;
		}
	    .time {
	        color: #999;
	        margin-top: 16rpx;
	        font-size: 24rpx;
	    }
	}
}
</style>
